/**
* @file Datatype.c
*  
* @author W. P. Yao, ywp@pku.edu.cn
* 
* @date 2015-12-11
*
* @brief declare variables' type
*/

#include "Datatype.h"

int i, j, k;
int NUM, Add_NUM;
int M, Add_M;
int Inset_N, Step_Max, Step;
int ** C_INDEX;
int myrank, sum_rank;

double MOVE_X, MOVE_Y;
double DH, DH_t;
double START, END;
double Time, duration, starttime, endtime;

fftw_complex *R_rho, *R_omega;
fftw_complex *C_rho, *C_rho_x, *C_rho_y, *C_rho_o, *C_rho_n;
fftw_complex *C_omega, *C_omega_x, *C_omega_y, *C_omega_o, *C_omega_n;
fftw_complex *C_u, *C_v;
fftw_complex *C_psi, *C_psi_x, *C_psi_y;

fftw_complex *R_Add_u, *R_Add_v;
fftw_complex *R_Add_rho_x, *R_Add_rho_y;
fftw_complex *R_Add_omega_x, *R_Add_omega_y;
fftw_complex *R_Add_phi, *R_Add_psi;

fftw_complex *in, *out, *In, *Out;

fftw_plan fftw_fp, fftw_bp, fftw_fip, fftw_bop;

FILE *Plot_File;
char File_Name[100];

MPI_Datatype matrix_type;
MPI_Datatype column_type;
MPI_Datatype transposed_matrix_type;
MPI_Status status;
MPI_Errhandler errhdl;





